package com.ruoyi.wxb.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.wxb.domain.Person;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/RequestController")
public class RequestController {

    /** 获取路径变量 */
    @SaIgnore
    @GetMapping("/PathVariable/{val}")
    public R<Void> PathVariable(@PathVariable String val) {
        return R.ok(val);
    }

    /** 获取Json参数 */
    @SaIgnore
    @PostMapping("/RequestBody")
    public R<Person> requestBody(@RequestBody Person person) {
        return R.ok(person);
    }

}
